<!--
 * @Author: Administrator 843338961@qq.com
 * @Date: 2022-07-02 14:29:49
 * @LastEditors: Administrator 843338961@qq.com
 * @LastEditTime: 2022-07-02 16:42:08
 * @FilePath: \mall\src\components\content\goods\Goods.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="goods">
    <goods-item v-for="item in goods" :good="item" :key="item.iid" @click.native="itemClick(item)"></goods-item>
  </div>
</template>

<script>
import GoodsItem from './GoodsItem.vue'

export default {
    name:'Goods',
    components: { GoodsItem },
    props:{
      goods:{
        type:Array,
        default(){
          return []
        }
      }
    },
    methods:{
     itemClick(item){
      //  console.log('---');
       this.$router.push('/detail/'+item.iid);
    }
    }
   
}
</script>

<style>
.goods{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
</style>